/**
 * 作者：陈文斌 on 2019/1/18.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:json_annotation/json_annotation.dart';
import 'package:crm/model/Company/company_info_model.dart';
import 'package:crm/model/Customer/customer_model.dart';
import 'package:crm/model/Customer/customers_group_by_company_model.dart';

part 'customer_group_model.g.dart';

@JsonSerializable()
class CustomerGroupModel extends Object with _$CustomerGroupModelSerializerMixin {
  String Id;
  int Ordering;
  String CompanyId;
  CompanyInfoModel Company;
  String Name;
  String Notes;
  List<CustomerModel> Customers;
  List<CustomersGroupByCompanyModel> CustomersGroupByCompany;

  CustomerGroupModel(
    this.Id,
    this.Ordering,
    this.CompanyId,
    this.Company,
    this.Name,
    this.Notes,
    this.Customers,
    this.CustomersGroupByCompany,
  );

  @override
  factory CustomerGroupModel.fromJson(Map<String, dynamic> json) => _$CustomerGroupModelFromJson(json);
}
